home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Diamond Collection
/
The Diamond Collection (Software Vault)(Digital Impact).ISO
/
cdr49
/
dispwet1.zip
/
UPWET.WCC
< prev
next >
Wrap
Text File
|
1995-02-17
|
3KB
|
90 lines
REM WCcode module for moving/unpacking/converting new weather maps.
REM Written by Mark Davis, Crystal Wind Communications, Inc in Jan 1995
REM Released as SHARE-WITH-ME-WARE, if you like it, use it, share
REM something you've done with me. Fido 1:3653/66 BBS 904-564-0101
REM Enjoy...
REM this one is not quite finished, as I was going to put a "flag" in
REM to check and see if a user was in the app, so I would not get any
REM share violations overwriting a file someone was trying to download.
REM you may want to finish this...
REM Check for new weather files and move to the appropriate dir
Dim FlagName as String
FlagName = "D:\WEATHER\MOVING.FLG"
Dim WetDir as String
WetDir = "D:\WEATHER\"
Dim WetSing as String
WetSing = "D:\WEATHER\SINGLES\"
Dim UseFlag as String
UseFlag = "D:\WEATHER\USING.*"
Dim SatDir as String
SatDir = "S:\WETV\"
Dim TBBSdir as String
TBBSdir = "R:\WEATHER\"
Dim FlagChk as SearchRec
Sub UnzipNew (File2unPAK as String)
REM Unzip newfile to Singles Dir
Dim CommLine as String
CommLine = "Pkunzip -o " + File2unPak + " " + WetSing
Shell CommLine
End Sub
Function TestDate (NewFile2Test as String,OldFile2Test as String) as boolean
TestDate = False
Dim D1 as Date
Dim X1 as Time
Dim D2 as Date
Dim X2 as Time
Dim OldFile as String
Dim NewFile as String
Dim Srec1 as SearchRec
OldFile = WetDir + OldFile2Test
Dim Srec2 as SearchRec
NewFile = SatDir + NewFile2Test
If FindFirst(OldFile,0,Srec1) = 0 then
D1 = Srec1.Date
X1 = Srec1.Time
End If
If Findfirst(NewFile,0,Srec2) = 0 then
D2 = Srec2.Date
X2 = Srec2.Time
End If
If (( D2.Number > D1.Number ) or ( X2.Number > X1.Number )) then
TestDate = TRUE
End if
End Function
REM MAIN PROGRAM
RESTART:
If FindFirst(UseFlag,0,FlagChk) = 0 then
Delay 10
goto RESTART
End if
If (TestDate("RADAR.ARC","RADAR.ZIP")) = TRUE then
copyfile("S:\WETV\RADAR.ARC","D:\WEATHER\RADAR.ZIP")
UnZipNew("D:\WEATHER\RADAR.ZIP")
shell "d:\weather\singles\convrad.bat"
End If
If (TestDate("SATELITE.ARC","SATELITE.ZIP")) = TRUE then
copyfile("S:\WETV\SATELITE.ARC","D:\WEATHER\SATELITE.ZIP")
UnZipNew("D:\WEATHER\SATELITE.ZIP")
shell "d:\weather\singles\convsat.bat"
End If
If (TestDate("WEATHMAP.ARC","WEATHMAP.ZIP")) = TRUE then
copyfile("S:\WETV\WEATHMAP.ARC","D:\WEATHER\WEATHMAP.ZIP")
UnZipNew("D:\WEATHER\WEATHMAP.ZIP")
shell "d:\weather\singles\convwet.bat"
End If
KILL "D:\WEATHER\MOVING.FLG"